package com.jeesite.modules.ch.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 渠道结算Entity
 * @author 李寒冰
 * @version 2025-10-11
 */
@Table(name="ch_jiesuan", alias="a", label="渠道结算信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="jiesuan_code", attrName="jiesuanCode", label="结算编号"),
		@Column(name="create_time", attrName="createTime", label="申请结算日期", isUpdateForce=true),
		@Column(name="jiesuan_type", attrName="jiesuanType", label="结算类型 1对私 2对公"),
		@Column(name="jiesuan_jine", attrName="jiesuanJine", label="结算金额", isUpdateForce=true),
		@Column(name="shuilv", attrName="shuilv", label="税率"),
		@Column(name="fapiao_url", attrName="fapiaoUrl", label="发票附件"),
		@Column(name="examine_status", attrName="examineStatus", label="审核状态 1申请结算 2提交开票 3平台审核  4平台打款  5结束"),
		@Column(name="actual_jine", attrName="actualJine", label="实际到账金额", isUpdateForce=true),
		@Column(name="alipay_name", attrName="alipayName", label="收款人", queryType=QueryType.LIKE),
		@Column(name="alipay_code", attrName="alipayCode", label="支付宝账户"),
		@Column(name="company_name", attrName="companyName", label="公司名称", queryType=QueryType.LIKE),
		@Column(name="bank_name", attrName="bankName", label="开户行", queryType=QueryType.LIKE),
		@Column(name="bank_code", attrName="bankCode", label="银行账户"),
		@Column(name="channel_id", attrName="channelId", label="渠道"),
	}, orderBy="a.id DESC"
)
public class ChJiesuan extends DataEntity<ChJiesuan> {
	
	private static final long serialVersionUID = 1L;
	private String jiesuanCode;		// 结算编号
	private Date createTime;		// 申请结算日期
	private String jiesuanType;		// 结算类型 1对私 2对公
	private Double jiesuanJine;		// 结算金额
	private String shuilv;		// 税率
	private String fapiaoUrl;		// 发票附件
	private String examineStatus;		// 审核状态 1申请结算 2提交开票 3平台审核  4平台打款  5结束
	private Double actualJine;		// 实际到账金额
	private String alipayName;		// 收款人
	private String alipayCode;		// 支付宝账户
	private String companyName;		// 公司名称
	private String bankName;		// 开户行
	private String bankCode;		// 银行账户
	private String channelId;

	private String meitiName;

	public String getMeitiName() {
		return meitiName;
	}

	public void setMeitiName(String meitiName) {
		this.meitiName = meitiName;
	}

	public String getChannelId() {
		return channelId;
	}

	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

	public ChJiesuan() {
		this(null);
	}
	
	public ChJiesuan(String id){
		super(id);
	}
	
	@Size(min=0, max=255, message="结算编号长度不能超过 255 个字符")
	public String getJiesuanCode() {
		return jiesuanCode;
	}

	public void setJiesuanCode(String jiesuanCode) {
		this.jiesuanCode = jiesuanCode;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Size(min=0, max=2, message="结算类型 1对私 2对公长度不能超过 2 个字符")
	public String getJiesuanType() {
		return jiesuanType;
	}

	public void setJiesuanType(String jiesuanType) {
		this.jiesuanType = jiesuanType;
	}
	
	public Double getJiesuanJine() {
		return jiesuanJine;
	}

	public void setJiesuanJine(Double jiesuanJine) {
		this.jiesuanJine = jiesuanJine;
	}
	
	@Size(min=0, max=255, message="税率长度不能超过 255 个字符")
	public String getShuilv() {
		return shuilv;
	}

	public void setShuilv(String shuilv) {
		this.shuilv = shuilv;
	}
	
	@Size(min=0, max=255, message="发票附件长度不能超过 255 个字符")
	public String getFapiaoUrl() {
		return fapiaoUrl;
	}

	public void setFapiaoUrl(String fapiaoUrl) {
		this.fapiaoUrl = fapiaoUrl;
	}
	
	@Size(min=0, max=2, message="审核状态 1申请结算 2提交开票 3平台审核  4平台打款  5结束长度不能超过 2 个字符")
	public String getExamineStatus() {
		return examineStatus;
	}

	public void setExamineStatus(String examineStatus) {
		this.examineStatus = examineStatus;
	}
	
	public Double getActualJine() {
		return actualJine;
	}

	public void setActualJine(Double actualJine) {
		this.actualJine = actualJine;
	}
	
	@Size(min=0, max=255, message="收款人长度不能超过 255 个字符")
	public String getAlipayName() {
		return alipayName;
	}

	public void setAlipayName(String alipayName) {
		this.alipayName = alipayName;
	}
	
	@Size(min=0, max=255, message="支付宝账户长度不能超过 255 个字符")
	public String getAlipayCode() {
		return alipayCode;
	}

	public void setAlipayCode(String alipayCode) {
		this.alipayCode = alipayCode;
	}
	
	@Size(min=0, max=255, message="公司名称长度不能超过 255 个字符")
	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	
	@Size(min=0, max=255, message="开户行长度不能超过 255 个字符")
	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	
	@Size(min=0, max=255, message="银行账户长度不能超过 255 个字符")
	public String getBankCode() {
		return bankCode;
	}

	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}
	
}